import request from '@/utils/request';

// request.defaults.baseURL = 'http://q3vm2n.natappfree.cc'  // 建军的居家办公环境(本地)

//+++++++++++++++++++++++++++++++++++++++++群发管理++++++++++++++++++++++++++++++++++++
//客户群发列表接口
export function customerListData(data: any) {
    return request({
        url: '/scrm-api/console/channel/customer/mass/list',
        method: 'POST',
        data
    });
}
//创建客户群发接口
export function createCustomer(data: any) {
    return request({
        url: '/scrm-api/console/channel/customer/mass/create',
        method: 'POST',
        data
    });
}
//客户群发详情接口
export function customerInfo(data: any) {
    return request({
        url: '/scrm-api/console/channel/customer/mass/info',
        method: 'get',
        params: data
    });
}
//客户群提醒接口
export function customerRemind(data: any) {
    return request({
        url: '/scrm-api/console/channel/customer/mass/remind',
        method: 'get',
        params: data
    });
}
//客户群删除
export function customerDel(data: any) {
    return request({
        url: '/scrm-api/console/channel/customer/mass/del',
        method: 'get',
        params: data
    });
}
//客户群导出客户接口--异步任务导出
export function customerExport(data: any) {
    return request({
        url: '/scrm-api/console/channel/customer/mass/sync-task',
        method: 'post',
        data: data
    });
}
// ++++++++++++++++++++++++++++++++++客户群群发++++++++++++++++++++++++++++++
//创建客户群群发接口
export function createGroups(data: any) {
    return request({
        url: '/scrm-api/console/channel/group/mass/create',
        method: 'post',
        data
    });
}
//客户群群发列表接口
export function channelGroupsList(data: any) {
    return request({
        url: '/scrm-api/console/channel/group/mass/list',
        method: 'post',
        data
    });
}
//客户群群发详情接口
export function channelGroupsInfo(data: any) {
    return request({
        url: '/scrm-api/console/channel/group/mass/info',
        method: 'get',
        params: data
    });
}
//客户群群发提醒接口
export function channelGroupsRemind(data: any) {
    return request({
        url: '/scrm-api/console/channel/group/mass/remind',
        method: 'get',
        params: data
    });
}
//客户群群删除接口
export function channelGroupsDel(data: any) {
    return request({
        url: '/scrm-api/console/channel/group/mass/del',
        method: 'get',
        params: data
    });
}
//客户群群删除接口
export function channelGroupsExport(data: any) {
    return request({
        url: '/scrm-api/console/channel/group/mass/export',
        method: 'get',
        params: data
    });
}
//根据筛选条件计算出触达客户多少人
export function filterChannelCustomer(data: any) {
    return request({
        url: '/scrm-api/console/channel/customer/mass/screen',
        method: 'post',
        data
    });
}
//根据筛选条件计算出触达客户群
export function filterChannelCustomerGroup(data: any) {
    return request({
        url: '/scrm-api/console/channel/group/mass/screen',
        method: 'post',
        data
    });
}
//获取外呼
export function getCall(data?: any) {
    return request({
        url: '/scrm-api/console/sms-auth/sso',
        method: 'post',
        data
    });
}
// 客户群发列表弹窗
export function getWorkUserMassDetail(data?: any) {
    return request({
        url: '/scrm-api/console/channel/customer/mass/getWorkUserMassDetail',
        method: 'post',
        data
    });
}
